{
 "metadata": {
  "name": "Rectangle_Wedge_Tail_Decomposition"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import  division\n",
      "%qtconsole"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import sympy as S\n",
      "import sympy.stats as st"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "u=S.symbols('u')\n",
      "p=st.LogNormal('u',0,0.5)\n",
      "pu=st.density(p)(u)\n",
      "fx=S.lambdify(u,pu,'numpy')\n",
      "x = linspace(0.001,4,100)\n",
      "hist([st.sample(p) for i in range(1000)],bins=50,normed=1);\n",
      "plot(x,fx(x),'r-',lw=3.)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "pyout",
       "prompt_number": 20,
       "text": [
        "[<matplotlib.lines.Line2D at 0x7969c50>]"
       ]
      },
      {
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAD9CAYAAAChtfywAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl0VfW99/H3DgkyhnnMCY2SCGHGgsGqNQ6MloiIVyiI\nF5RSh4va1sdn9barwNMr0tbl6gPam95HtIpVWkUZhMigUQFJVFCsAwQNkgSMBAlEBjPt54+dnIEk\nJwk5J3vvcz6vtfZy//b5nX2+Afyw+Z3fb2/DNE0TERFxrRi7CxARkZZRkIuIuJyCXETE5RTkIiIu\npyAXEXE5BbmIiMsFDfL58+fTp08fhg8f3mCfRYsWkZKSwsiRI9m7d2/ICxQRkeCCBvm8efPIyspq\n8PVNmzZx8OBB8vLy+Otf/8rdd98d8gJFRCS4oEF+9dVX061btwZfX79+PXfccQcAaWlplJaWUl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AAAAASUVORK5C\nYII=\n",
       "text": [
        "<matplotlib.figure.Figure at 0x7969790>"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "pw=[i*(S.Heaviside(u-j/2)-S.Heaviside(u-j/2-1/2)) for i,j in zip(S.symbols('a:8'),range(8))]\n",
      "pwf = lambda i: sum(pw).subs(u,i)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 162
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Rectangle Wedge Tail Decomposition"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "\n",
      "$$ f(x) = \\exp\\left(-\\frac{(x-1)^2}{2x} \\right)(x+1)/12 $$ \n",
      "\n",
      "where $x>0$"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "x = linspace(0.001,10,100)\n",
      "f= lambda x: (sqrt(1/x) + sqrt(x))/ (2.*pow(exp(1),pow(-sqrt(1/x) + sqrt(x),2)/ 2.)*sqrt(2*pi)*x)\n",
      "fx = f(x)\n",
      "plot(x,fx)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "pyout",
       "prompt_number": 13,
       "text": [
        "[<matplotlib.lines.Line2D at 0x7420770>]"
       ]
      },
      {
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAD9CAYAAABDaefJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt01OWdx/H3wAzlVkGuwkzYWBLJRC6JJiLgZRQ1lGq8\nYNfYY3UpIFXZFbeuvZz1NOy6SLxUWaPb1GNXrTakFjVUZbQRR6lIolKLCkJgTR2iUMMdI4QMs388\nzQ3CZJLMzG8un9c5z5n5ZZ78ni85+s2T7/P8fj9bMBgMIiIiSaGP1QGIiEjkKKmLiCQRJXURkSSi\npC4ikkSU1EVEkoiSu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ONwaamJqtDipmioqLg\nmDFjgg6HI+hyuYK//vWvg7t37w7OnDmzW1saY/KQDBERiY3U3nogIpJklNRFRJKIkrqISBJRUhcR\nSSJK6iIiSURJXUQkifw/H7853mKQivAAAAAASUVORK5CYII=\n",
       "text": [
        "<matplotlib.figure.Figure at 0x71dc4f0>"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "u=S.symbols('u')\n",
      "p=S.Piecewise(*[(f(j),(i<u<=j)) for i,j in zip(range(10),range(1,11))]+[(0,True)])\n",
      "plot(x,[p.subs(u,i) for i in x],x,fx)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "pyout",
       "prompt_number": 14,
       "text": [
        "[<matplotlib.lines.Line2D at 0x7744410>,\n",
        " <matplotlib.lines.Line2D at 0x77445b0>]"
       ]
      },
      {
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAD9CAYAAABDaefJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtclHW+B/DPM8xwVUAQUWYwVFAGL4hCXsvximtFlrZS\np+yYqVuxm53d41Zney3u6Zh02S5SLdurtmwLqUyx1KnIpryCSkol6mhOjSgI3hFlYHjOH+MgCA4z\nMDPPMPN5v17zmnlmfvP7fSX6+vP7/J7fI4iiKIKIiLyCTOoAiIjIeZjUiYi8CJM6EZEXYVInIvIi\nTOpERF6ESZ2IyIt0mNS1Wi0SExORkJCAnJycNp/X1NRg5syZGDlyJIYNG4Z3333XFXESEZEdBFvr\n1M1mM4YMGYKioiIolUqkpaUhPz8farW6uU12djbq6+vx3HPPoaamBkOGDEFVVRXkcrlb/gBERHSN\nzZl6SUkJ4uPjERcXB4VCgczMTBQWFrZq069fP1y4cAEAcOHCBURGRjKhExFJxGb2raioQGxsbPOx\nSqVCcXFxqzaLFi3ClClTEBMTg4sXL+Kjjz5q048gCE4Kl4jItzh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7ClEUsXDhQiQlJWHp0qVShyOpFStWwGg04tixY1izZg2mTJnSfK2Dr+nbty9iY2Nx+PBhAEBR\nURGGDh0qcVTSSExMxK5du3D58mWIooiioiIkJfn2ndIyMjLw3nvvAQDee+89+yaDrlqeY7Vp0yZx\n8ODB4qBBg8QVK1a4ejiPtXXrVlEQBDE5OVkcOXKkOHLkSHHz5s1ShyU5nU4n3nHHHVKHIal9+/aJ\nqamp4ogRI8S77rpLPHfunNQhSSYnJ6d5SeP8+fNFk8kkdUhuk5mZKfbr109UKBSiSqUS33nnHfH0\n6dPi1KlTHVrS6JY7HxERkXv49tIDIiIvw6RORORFmNSJiLwIkzoRkRdhUici8iJM6kREXuT/AU6y\nY0VuuYqwAAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x74200f0>"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 14
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}